namespace Cos.Core.NHibernate.Mapping
{
    using FluentNHibernate.Mapping;
    
    public class ArchivePageMap : ClassMap<ArchivePageDataModel>
    {
        public ArchivePageMap()
        {
            this.Table("ArchivePage");
            this.LazyLoad();
            this.Id(x => x.Id).GeneratedBy.Native().Column("ArchivePageID");
            this.Map(x => x.NavId).Not.Nullable().Column("NavID");
            this.Map(x => x.CultureCode).Not.Nullable().Column("CultureCode");
            this.Map(x => x.ArchiveDate).Not.Nullable().Column("ArchiveDate");
            this.Map(x => x.PageName).Column("PageName");
            this.Map(x => x.IsPageNavEnd).Not.Nullable().Column("PageNavEnd");
            this.Map(x => x.Author).Column("Author");
            this.Map(x => x.IsPageVisible).Not.Nullable().Column("PageVisibility");
            this.Map(x => x.IsPageVisibilityPreview).Not.Nullable().Column("PageVisibilityPreview");
           // this.HasMany(x => x.ArchiveElements).Not.KeyNullable().KeyColumn("ArchivePageID");
        }
    }
}